<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#006699"
       style="font-family: verdana, arial, helvetica; font-size: small;">
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF"
                   style="font-family: verdana, arial, helvetica; font-size: small;">
                <tr valign="top">
                    <td>
                        <?php if ($data['header']): ?>
                        <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
                            <tr>
                                <td>
                                    <?php print $data['site_logo']; ?>
                                </td>
                                <td width="98%">
                                    <div style="padding-left: 1em;">
                                        <span style="font-size: large;"><?php print $data['site_name']; ?></span><br/>
                                        <?php print $data['site_slogan']; ?>
                                    </div>
                                </td>
                                <td nowrap="nowrap">
                                    <?php print $data['store']->address1; ?><br/><?php print $data['store']->phone; ?>
                                </td>
                            </tr>
                        </table>
                        <?php endif;?>
                    </td>
                </tr>

                <tr valign="top">
                    <td>
                        <table cellpadding="4" cellspacing="0" border="0" width="100%"
                               style="font-family: verdana, arial, helvetica; font-size: small;">
                            <tr>
                                <td colspan="2" bgcolor="#006699" style="color: white;">
                                    <b><?php print t('Shipping Information:'); ?></b>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table width="100%" cellspacing="0" cellpadding="0"
                                           style="font-family: verdana, arial, helvetica; font-size: small;">
                                        <tr>

                                            <td valign="top" width="50%">
                                                <b><?php print t('Shipping Address:'); ?></b><br/>
                                                <?php print $data['shipping']->address_html; ?><br/>
                                            </td>
                                        </tr>
                                    </table>

                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#006699" style="color: white;">
                                    <b><?php print t('Packages Summary:'); ?></b>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#EEEEEE">
                                    <font color="#CC6600"><b><?php print t('Shipping Details:'); ?></b></font>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">

                                    <table border="0" cellpadding="1" cellspacing="0" width="100%"
                                           style="font-family: verdana, arial, helvetica; font-size: small;">
                                        <tr>
                                            <td nowrap="nowrap">
                                                <b><?php print t('Package #:'); ?></b>
                                            </td>
                                            <td width="98%">
                                                <?php print $data['order']->oid; ?>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td nowrap="nowrap">
                                                <b><?php print t('Order Date: '); ?></b>
                                            </td>
                                            <td width="98%">
                                                <?php print format_date($data['order']->added_time); ?>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td nowrap="nowrap">
                                                <b><?php print t('Shipping Method:'); ?></b>
                                            </td>
                                            <td width="98%">
                                                <?php print $data['order']->options['shipping_method']['name'] .' - $'.$data['order']->options['shipping_method']['fee']; ?>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td nowrap="nowrap">
                                                <?php print t('Items Fee:'); ?>&nbsp;
                                            </td>
                                            <td width="98%">
                                                <?php print $data['']; ?>
                                            </td>
                                        </tr>

                                        <?php foreach ($line_items as $item): ?>
                                        <?php if ($item['type'] == 'subtotal' || $item['type'] == 'total') {
                                            continue;
                                        } ?>

                                        <tr>
                                            <td nowrap="nowrap">
                                                <?php print $item['title']; ?>:
                                            </td>
                                            <td>
                                                <?php print $item['formatted_amount']; ?>
                                            </td>
                                        </tr>

                                        <?php endforeach; ?>

                                        <tr>
                                            <td>&nbsp;</td>
                                            <td>------</td>
                                        </tr>

                                        <tr>
                                            <td nowrap="nowrap">
                                                <b><?php print t('Total for this Order:'); ?>&nbsp;</b>
                                            </td>
                                            <td>
                                                <b><?php print $order_total; ?></b>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="2">
                                                <br/><br/><b><?php print t('Products on order:'); ?>&nbsp;</b>

                                                <table width="100%"
                                                       style="font-family: verdana, arial, helvetica; font-size: small;">

                                                    <?php foreach ($products as $product): ?>
                                                    <tr>
                                                        <td valign="top" nowrap="nowrap">
                                                            <b><?php print $product->qty; ?> x </b>
                                                        </td>
                                                        <td width="98%">
                                                            <b><?php print $product->title; ?>
                                                                - <?php print $product->total_price; ?></b>
                                                            <?php print $product->individual_price; ?><br/>
                                                            <?php print t('SKU'); ?>: <?php print $product->model; ?>
                                                            <br/>
                                                            <?php print $product->details; ?>
                                                        </td>
                                                    </tr>
                                                    <?php endforeach; ?>
                                                </table>

                                            </td>
                                        </tr>
                                    </table>

                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
